Remove unused DataProtection configuration from Sidecar#3776
Merged
Remove unused DataProtection configuration from Sidecar#3776
Conversation
Copilot
AI
changed the title
[WIP] Fix DataProtection in SideCar to use encryption
Remove unused DataProtection configuration from Sidecar
Apr 15, 2026
bgavrilMS
approved these changes
Apr 15, 2026
Agent-Logs-Url: https://github.com/AzureAD/microsoft-identity-web/sessions/bf35223d-645a-489b-9d64-3769b4a891af Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com>
9385ec1 to
2dc9f60
Compare
gladjohn
approved these changes
Apr 17, 2026
This was referenced Apr 20, 2026
This was referenced Apr 26, 2026
deps: Bump Microsoft.Identity.Web from 4.7.0 to 4.8.0
microsoft/dragon-copilot-extension-samples#217
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Sidecar uses in-memory token caching (
AddInMemoryTokenCaches), so theConfigureDataProtectionmethod was never actually protecting tokens at rest. Beyond being dead code, it introduced compliance concerns: keys were persisted to disk in plaintext by default, and the optional certificate-based encryption had no rotation mechanism.Changes
Program.cs: RemoveConfigureDataProtectionmethod and its call site; drop unusedusingdirectives forSystem.Security.Cryptography.X509CertificatesandMicrosoft.AspNetCore.DataProtection. The Sidecar now relies on ASP.NET Core's default ephemeral in-memory data protection.README.md: Remove the Data protection configuration entry documenting the now-deletedDATA_PROTECTION_KEYS_PATH,DATA_PROTECTION_CERT_PATH, andDATA_PROTECTION_CERT_PASSWORDenvironment variables.